﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model.Db;
using HengTong.Model;
using HengTong.Model.Db.Hr;


namespace HengTong.ViewModel.Person.SysPersonEducationVms
{
    public partial class SysPersonEducationTemplateVm : BaseTemplateVM
    {
        [Display(Name = "员工")]
        public ExcelPropety PersonExcel = ExcelPropety.CreateProperty<SysPersonEducation>(x => x.PersonId);
        [Display(Name = "学校")]
        public ExcelPropety SchoolExcel = ExcelPropety.CreateProperty<SysPersonEducation>(x => x.School);
        [Display(Name = "专业")]
        public ExcelPropety MajorExcel = ExcelPropety.CreateProperty<SysPersonEducation>(x => x.Major);
        [Display(Name = "学历")]
        public ExcelPropety EducationLevelExcel = ExcelPropety.CreateProperty<SysPersonEducation>(x => x.EducationLevel);
        [Display(Name = "学制")]
        public ExcelPropety EducationSystemExcel = ExcelPropety.CreateProperty<SysPersonEducation>(x => x.EducationSystem);
        [Display(Name = "入学日期")]
        public ExcelPropety EnrollmentDateExcel = ExcelPropety.CreateProperty<SysPersonEducation>(x => x.EnrollmentDate);
        [Display(Name = "毕业日期")]
        public ExcelPropety GraduationDateExcel = ExcelPropety.CreateProperty<SysPersonEducation>(x => x.GraduationDate);

	    protected override void InitVM()
        {
            PersonExcel.DataType = ColumnDataType.ComboBox;
            PersonExcel.ListItems = DC.Set<SysPerson>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class SysPersonEducationImportVm : BaseImportVM<SysPersonEducationTemplateVm, SysPersonEducation>
    {

    }

}
